|
B Journey wrote: I have placed one label in 1st tab page and set its visibility to true. When I shift to 2nd tab page the label's visibility has treated as invisible
Ummm...No, it isn't. It's Visible property is still True, the thign is you changed the page that the control is sitting on! It's just like pages in a book. If you change the selected tab, you turn the page. Stuff that's on the previous page is no longer visible.
You're explanation of what you want to do needs more clarification. I can't figure why you're trying to get the Visible property of your label.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I thought the same as you do Dave but it is not working that way. The label1 is placed on 1st tab page and itss state is visible. However, when i shift from next tab page at runtime (while the code is checking its visibility) it says now the label's state is invisible. I tested this with a message box and I got the state status (Invisible) while I was on the 2nd tab page. I am not sure if it is a bug in the Visual Studio 2005.
But thank you for your help. In the meanwhile, do you know where I can get a sample code for wrting WAB (Windows Address Book) in vb.net?
Bedri
|
|
|
|
|
Damn! Screw up on my part. No, the Visible property reflects the actual state of the control. If some other window obscures the entire control in question, it's Visible property returns False, well, because it's not visible anymore. It's functionality is by design, it's not a bug.
As for the Address Book, I don't know of any example code in VB.NET. But, the documentation for the WAB API is here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey folks. I'm faily new to VB2005 and I was wondering if theres a way to have a second form display in the same window as the first (root) form appears
I know you can display a second form in a seperate window by using
my.forms.form2.showDialog()
Thats OK but I would like to have, if possible, the form show in the window that is already open.
any help would be appreciated
Thanks
Microsofts like the dentist you really dread going to them but eventually your forced to.
|
|
|
|
|
Well, if you'll notice, the Form class derives from Control. Since all the controls you see on the form derive from, obviously, Control, Form should be able to be used just like a control. You can't make it appear using ShowDialog, but you can treat it just like any other control.
See this[^] little article on MSDN for more information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anybody know how to correctly use the GetUserObjectInformation in VB.Net. I seem to have many problems trying to get it to work. Here is what I am basically trying to do. I want to get the current desktop name. So in order to do so I have to call GetThreadDesktop(GetCurrentThreadId()). Which would go into the handle part of the GetUserObjectInformation call. But for some reason with everything filled in I get an error 0. I have seen this done many times in C++ and C# but have not found any reference in VB.Net.
Thanks,
Jason
|
|
|
|
|
|
Is your API declare like this?:
Private Declare Function GetSystemMenu Lib "user32" _<br />
(ByVal hWnd As Long, _<br />
ByVal bRevert As Long) As Long
Eric Dahlvang-Programmer
|
|
|
|
|
Ah! The declare had hwnd as an integer. I used Long like you said and it works great now!
thanks,
sb
|
|
|
|
|
The correct declaration should be:
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As IntPtr, ByVal bRevert As Integer) As IntPtr
Handles should always be declared IntPtrs because, just like handles, they're going to be the width of the processor, 32-bit on 32-bit procs and 64-bits wide on 64-bit procs.
The declaration you used, using Long , is a VB6 declaration. In VB6, Long are 32-bit signed integers. In VB.NET, they're 64-bit signed integers. The two representations are NOT compatible with each other!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Good Point
(pun intended)
Eric Dahlvang-Programmer
|
|
|
|
|
hellow to all
i am using Crystal Reports , to view and prints reports ..
i wanna generate a report from SQL Statement automatically , with out going throw the wizard and building column column ,
i wanna take an sql statement with various parameters and show the data in a crystal report ...
how can i build it ?
thxx for any help ..
|
|
|
|
|
Hi all,
I'd like to convert an integer to a formatted string that would be filled with "0" until a certain numbers of characters. For example: if the integer value is 10 and the formatted string has to have a length of 6 characters then the final string it would be "000010". Is there any VB6 function to do that?
Thanks in advance,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Format$(10,"0000000")
Eric Dahlvang-Programmer
|
|
|
|
|
Thanks a lot !!
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
How can I call a word macro when the document is loaded? (I cannot save it in the document)
I tried with command line param but then it tried to run the macro before the document is loaded. Also saved it in the normal.dot template but I don't have a trigger to call it
Dani
|
|
|
|
|
In Word help you will find
Run a macro
On the Tools menu, point to Macro, and then click Macros.
In the Macro name box, click the name of the macro you want to run.
If the macro doesn't appear in the list, select a different document, template, or list in the Macros in box.
Click Run.
But I like to add a button to the toolbar and have it run the macro:
Add a button to a toolbar
Show the toolbar you want to add a button to.
On the Tools menu, click Customize, and then click the Commands tab.
In the Categories box, click a category for the command you want the button to perform.
Drag the command or macro you want from the Commands box to the displayed toolbar.
If you don't see the command you want under a particular category, click All Commands in the Categories box.
Tip To quickly add a built-in button to a built-in toolbar, click More Buttons on a docked toolbar, (or click the arrow in the upper-left corner of a floating toolbar), click Add or Remove Buttons and then select the check box next to the button you want to add.
Eric Dahlvang-Programmer
|
|
|
|
|
I am afraid this isn't the exact solution. THe thing is, I need to embed this in my application so that it is transparent for the user (from an intranet web application I launch word through havascript to open a dynamic XML from a web service and an XSL to build the document - HTML). I don't want the user to interact at all (needs to be fully automatic) and it needs to be triggered right after the document loads.
|
|
|
|
|
hi there,
i have a problem in adding backgroundimage to listbox control in vb.net.
how can i add a backgroundimage to a listbox control.
i tried with following code. but its not the right solution to my problem.
i want to add a backgroundimage to listbox and also it should not be highlighted when i select any item in listbox.
" Dim g As Graphics
Dim font As Font = New Font("Verdana", 20, FontStyle.Bold,GraphicsUnit.Pixel)
Dim WBrush As New SolidBrush(Me.BackColor)
listbox1.CreateGraphics.DrawString("CONFLICT", font, WBrush, 0, 200)
please can anyone find the solution to this problem.
i will be very thankful if anyone can find a solution to this problem
thanks in advance.
nagaraju
|
|
|
|
|
You should go with protected overwrites of paint and use drawimage statement for background picture.
|
|
|
|
|
can u give few lines of code to draw any image on listbox as a hint
i didn't get ur words exactly.
the problem is when add code to drawstring its getting highlighted when i select any item in the listbox
hope u understand.
thanks for ur interest
kondepudi
-- modified at 6:57 Tuesday 31st January, 2006
|
|
|
|
|
hi there,
i have a problem in adding backgroundimage to listbox control in vb.net.
how can i add a backgroundimage to a listbox control.
i tried with following code. but its not the right solution to my problem.
i want to add a backgroundimage to listbox and also it should not be highlighted when i select any item in listbox.
" Dim g As Graphics
Dim font As Font = New Font("Verdana", 20, FontStyle.Bold,GraphicsUnit.Pixel)
Dim WBrush As New SolidBrush(Me.BackColor)
listbox1.CreateGraphics.DrawString("CONFLICT", font, WBrush, 0, 200)
i will be very thankful if anyone can find a solution to this problem
thanks in advance.
nagaraju
|
|
|
|
|
Hi
I want to display a control(ListView) inside the datagrid view
So the problem I encounter r:
1.How to get the Top & Left of the cell underneath I want to display that List View
2. If I add that List View with
me.datagridview1.controls.add(Lisview)
Listview.setBounds(hti.ColumnX,Hti.RowY,100,100)
But this is also not suceeded Properly
Then the control at the last or last to last row Cuts
As the ListView does not get the proper Space to occupy
Should I add that control to form Rather than DataGridView
But then how to Show the list view correspondingly with Datagridview cells (Like every cell in the Column2 has a image Clik on that iamge will show LisView underneath that cell)
Thanks For this Help
Hema Chaudhry
|
|
|
|
|
Hello!
I don't know how I can make an entry in to WAB (Windows Address Book) and how I could check if the entry I am intending to make is already exist or not.
I am seeking Vb.NET code samples about WAB and It has been for days I haven't found any.
If you help me to work it out, I would really appreciate it!
Thanks!
Bedri
|
|
|
|
|