Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Saturday at 3:51 PM
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Nov 4, 2026
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Windows RDP Only Rs.500 a month
Blogerwiki
Updated:
Nov 1, 2026
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
C# Programing FAQ - Post here
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="asachan" data-source="post: 4868231" data-attributes="member: 189916"><p>Correction</p><p>======</p><p>First of all your Form instance call is not complete </p><p>it should be like this</p><p></p><p> frmCustomer fCus = new frmCustomer();</p><p> fCus.Activate(); </p><p> fCus.Show();</p><p></p><p>Now it's complete and the form will be activated and windows handles will be created properly. without activate() , form never receive the forces . and if some other program runs as "Top owner level in User Mode" in windows , your form will not create handles to the User windows Mode in Kernel. </p><p></p><p></p><p>Solution to your question man</p><p>===================</p><p></p><p>First you have to look that the given form instance is already in the Heap(U know what is heap right?) . so how can we do it?</p><p></p><p>1. getting all active forms on the Application</p><p></p><p><strong>FormCollection frms = Application.OpenForms;</strong></p><p></p><p>2. loop through forms and see if our form is in the collection</p><p></p><p><strong> bool formAvailable = false;</strong></p><p><strong></strong></p><p> <strong>foreach (Form frm in frms)</strong></p><p> <strong>{</strong></p><p><strong> if (frm.Name.Trim().ToUpper() == "frm_allCosting".ToUpper())</strong></p><p><strong> {</strong></p><p><strong> formAvailable = true;</strong></p><p><strong> }</strong></p><p><strong>}</strong></p><p><strong></strong></p><p><strong>if(formAvailable == true){</strong></p><p><strong> //this means ur form already run and give a message to uer</strong></p><p><strong>}</strong></p><p><strong></strong></p><p></p><p></p><p>NOTE: "frm_allCosting<strong>" is the name of the form you need to look at</strong></p><p><strong></strong></p><p><strong>Hope this will help you man . good luck</strong></p><p><strong></strong></p></blockquote><p></p>
[QUOTE="asachan, post: 4868231, member: 189916"] Correction ====== First of all your Form instance call is not complete it should be like this frmCustomer fCus = new frmCustomer(); fCus.Activate(); fCus.Show(); Now it's complete and the form will be activated and windows handles will be created properly. without activate() , form never receive the forces . and if some other program runs as "Top owner level in User Mode" in windows , your form will not create handles to the User windows Mode in Kernel. Solution to your question man =================== First you have to look that the given form instance is already in the Heap(U know what is heap right?) . so how can we do it? 1. getting all active forms on the Application [B]FormCollection frms = Application.OpenForms;[/B] 2. loop through forms and see if our form is in the collection [B] bool formAvailable = false; foreach (Form frm in frms) { if (frm.Name.Trim().ToUpper() == "frm_allCosting".ToUpper()) { formAvailable = true; } } if(formAvailable == true){ //this means ur form already run and give a message to uer } [/B] NOTE: "frm_allCosting[B]" is the name of the form you need to look at Hope this will help you man . good luck [/B] [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom