|
You might want to try calling Application.DoEvents() before you call the dlg.ShowDialog(). It's no so much of a problem of when the event gets fired, but when it can get processed.
RageInTheMachine9532
|
|
|
|
|
I already tried that, it didn't make a difference.
Rugby League: The Greatest Game Of All.
|
|
|
|
|
OK. After going back and re-reading the original post, I misunderstood you.
Calling the Select methods in the ListView and TreeViews will NOT fire the AfterSelect events). They will only fire on mouse clicks. But, you can call those functions from another form's code if those functions are marked public. A better method would be to have your event handlers call these functions seperatly so you can make the functions public and not the eventhandlers:
The following is not useable code. It is a pseudo-code example for illustration purposes only!
Form1:
Dim dlg As New Dialog1
dlg.PopulateTreeView()
dlg.AfterSelectHandlerFunction()
dlg.ShowDialog()
Dialog1:
Private Sub TreeView_AfterSelect([eventargs stuff]) Handles TreeView.AfterSelect
AfterSelectHandlerFunction()
End Sub
Public Sub AfterSelectHandlerFunction()
[code to do whatever here]
End Sub
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When you create a toolbar in any .NET application, (I'm working in VB.net but I had the same problem in C#.net) and set the background image to whatever image you want, if the toolbar appearance is "flat" the background image takes over the toolbar and instead of the toolbar being gray, it's like the background image was also tiled on the toolbar
anyone ever seen this? There's no code involved to reproduce this problem, all you need is a toolbar with the appearance set to flat, and a background image
|
|
|
|
|
I have a question. How do I programmaticly open the System Properties dialog just like the user right clicked My Computer and selected Properties. I am using VB6. Any help would be GREATLY appreciated!
The Dragon
|
|
|
|
|
Ooops....found it. Here it is if anyone else is looking for it: link
The Dragon
|
|
|
|
|
Dear Expert,
I'm a mschart control newbie. Here are 3 Questions needed your help.
(below is supposing to use this contorl in VB , you can also use it in VC, or other windows program tools capable of using this ActiveX controls, the encountered problem is same)
Q1: When I set *.ChartType=VtChChartType2dXY, How can I set X-asis Label to
my own expected string instead of Xas automatic generated by
itself.(Such as datetime instead of "0 1 2 3 ...")
Q2: Both when *.ChartType=VtChChartType2dXY or VtChChartType2dLine,
and when Xas Lable string is too long , How can I display it in Multi-line
Q3: When *.ChartType=VtChChartType2dLine , and after I set xasis.tick.style=...Inside,
& xasis.tick.length=200, it does not take effect, nothing changes , and what I expected to occur does not occur
In sum, What I want to do is by using mschart (must , cant use any other 3rd party controls),
set xasis infos(such as label , tick style, length) customarily by my expected format
Thanks in advance , Expecting your answer!
Allen, Homer
|
|
|
|
|
Hi everybody,
i'm making a addin for outlook 2k3, it works fine but i can't add commandbarbutton in Standard commandbar.
Can you help me ?
this is my code source :
Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete
Dim oType As Type
Dim oArgs As Object()
Dim objMissing As Object = Missing.Value
'TODO: Connecter une nouvelle barre d'outils
' Ajout du bouton dans la barre standard
Try
oType = applicationObject.GetType
objCommandBars = oType.InvokeMember("CommandBars", BindingFlags.GetProperty, Nothing, applicationObject, Nothing)
stdCommandBar = objCommandBars.Item("Standard")
btnFortune = stdCommandBar.FindControl(MsoControlType.msoControlButton, objMissing, , "Fortune", True)
If (btnFortune Is Nothing) Then
btnFortune = stdCommandBar.Controls.Add(MsoControlType.msoControlButton, objMissing, objMissing, objMissing, objMissing)
btnFortune.Caption = "Fortune"
btnFortune.Style = MsoButtonStyle.msoButtonCaption
btnFortune.Tag = "Fortune"
btnFortune.Visible = True
End If
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.Message, ex.Source)
End Try
End Sub
At run, I take a "Unknown name" error (french message : "Nom Inconnu") on line "objCommandBars = oType.InvokeMember("CommandBars", BindingFlags.GetProperty, Nothing, applicationObject, Nothing)"
Thanks for your help.
Seb.
Sébastien FERRAND
|
|
|
|
|
If I have a DB on one machine in a network and I connect to it from an app on another machine, how do I supply the username and password for the PC with the DB on it. Is it done through the connection string or is there another way to get the client to pre-log on before attempting to make a connection to the DB.
Greg
|
|
|
|
|
Normally, you'd supply that information in the connection string. Is this an SQL Server? If so, then all you need is the SQL username and password in the connection string. I would avoid using Windows authentication or trusted connections if at all possible. Using an SQL login is more secure because this ID won't have access to the underlying server.
But if it's an Access database, then you'll have to authenticate to the machine before you can even attempt to get to the Access database. On the side, Access databases we're not designed for connections from other machines. It will work, but performance stinks and the number of connections you can get is, normally, very limited.
RageInTheMachine9532
|
|
|
|
|
Trust me I would love to be able to implement in SQL Server, But unfortunately I am pretty tied into Access, although admitidly performance is not really an issue. Which leaves the authentication problem. How can you, in VB .Net Authenticate a client logging onto another machine?
Greg
|
|
|
|
|
You can't do it entirely in managed code yet. You'd have to map a drive using the WNetUseConnection API. See this MSDN Article[^] for VB6 code on how to do this (translates pretty good to VB.NET)
You might also want to look into using the Windows Scripting Host Network object to do it too.
RageInTheMachine9532
|
|
|
|
|
Hi,
Could someone help developing an application to monitor the web activity. I want to develop something like an internet spy software which monitors the web sites opened by my internet explorer.
Till now i have just been able to create a new instance of the internet explorer object and monitor the activity of the instance.
But any other instances creates other than that by the application are not monitored.
|
|
|
|
|
IE already has this built in, called History.
RageInTheMachine9532
|
|
|
|
|
|
HI!
Now what?
RageInTheMachine9532
|
|
|
|
|
The system.web.mail namespace allows for sending mail via SMTP right. But one thing I cant figure out. What if the SMTP server requires authentication? Can the SMTPMail class log you into the server and if so, how? or is there another way?
Greg
|
|
|
|
|
The System.Web.Mail class doesn't yet support logging into an SMTP server. You'd have to either search the web for a 3rd party variant or write a better SMTP class yourself.
RageInTheMachine9532
|
|
|
|
|
Hi all,
I'm attempting to make a custom Textbox that is not derrived from the WinForms Textbox, Richtextbox, or Textboxbase with VB.Net or C#.
I am at a loss of how to procede. Does anyone have any suggestions? Chris Losinger posted an article[^] explaining it in C++ (but I can't use the code), and the SharpDevelop editor is too complex for my needs.
Thanks,
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
You would either start a Windows Control Library or Windows Application project to start. This will give you the basic functionality of your control, like handling input, controlling the controls bounds, supplying your window handle, ..., but no painting code at all. See this[^] for a documentation start on MSDN.
RageInTheMachine9532
|
|
|
|
|
Thanks. It's not much, but it is a start.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Is there a way to add images into the listview columns kinda like how outlook can display a paperclip instead of text? I have seen that people say that you must tie into the API to do it, but no one provides examples. Does any one know how to do it and is willing to share how they did it?
Thanks,
- Nick
The network is down...let's go get bagels.
|
|
|
|
|
Hi,
I don't get what are you trying to do.
Adding images to the items or the columns header is very simple to do, no APIs need it.
Try something like this
Dim li As ListItem
ListView1.ColumnHeaders.Add 1, "col1"
ListView1.ColumnHeaders.Add 2, "col2", "col2"
'ImageList1 must have at least one image.
Set ListView1.SmallIcons = ImageList1
Set ListView1.ColumnHeaderIcons = ImageList1
Set li = ListView1.ListItems.Add(1, "item1", "", , 1)
li.ListSubItems.Add 1, "subItem1", "sutItem", 1
ListView1.ColumnHeaders(1).Icon = 1
I'll suggest you to read the documentation of the control on the MSDN, if after that you still have troubles getting it work as you want, let me know and I'll help you.
Fabian
|
|
|
|
|
It appears that is for VB and not VB.net... .NET does not seem to have ColumnHeaders. ANy thoughts on how to do it in .NET?
The network is down...let's go get bagels.
|
|
|
|
|
Sub : How to use Amazon Web Services..
Hi all...
Please let me know How to start with amazon web services..
I'm not finding any XML or REST Query format to send request to amazon..
I've purchased Seller account but How to use that to upload Items..I don't know...
Please help me getting start..
I hope some one definatly know about this
e-mail if attachment at sumit_kapoor1980@hotmail.com
Thanks...
Sumit Kapoor---
|
|
|
|
|