|
|
Thanks a lot.
Regards,
Vykintas
|
|
|
|
|
I am finished with designing and implementing a mail server using VB6, now it works using the LAN, but it dose not recognize any other mail servers, like yahoo, or hotmail..
How can i make it do this
Regards
SS
|
|
|
|
|
hi guys i am newbi in VB.NET. I am having tables in access database and i want to take data for multiple employees. so i want to do this in DataGrid so user can easliy enter for multiple employee. I can show data from a table to a datagrid now how to update the same table as per the changes made in datagrid.
Also i want to know can we fill a table with a query in access?
Darshan Shah
|
|
|
|
|
Hi - welcome to code project, and programming in general ( well, VB anyhow ). What you're asking here is a common problem, which has been described in detail on hundreds of web pages. There's this site called google, http://www.google.com[^]. You'll find that if you pursue the world of programming, you'll use it a lot, because there are always new things to learn, and they are all just a google away. Of course, once you've done this and tried the examples you find online, you may still have more specific questions or problems, that's where message boards like this one come into it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Does ctl exist at this point ? Does it need to be initialised ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Garrett Klas wrote: Private sub Example()
Dim ctl as ctlExample
Dim iFontSize as integer
iFontSize = ctl.Fontsize <-- Throws Object/Variable not set Error
End Sub
ctl is not initialised. All you have done is reference it. You need Dim ctl as new ctlExample, or a Set ctl = new ctlExample at the start of the routine.
Having said that, the control, assuming it is a User Control, should be sited on a form. Just accessing the control in the manner you show probably won't do anything as it would be creating a new instance of the control and I am not sure where it would be. You really need to access the control where it is sited i.e. 'Form1.ctlExample.FontSize = x' again assuming that you have a property called FontSise exposed in the control.
-- modified at 6:19 Thursday 10th November, 2005
|
|
|
|
|
|
OK, I hope I am understanding you correctly.
Al you need to do is to set the variable in the class to the font size. You do not need to reference the control at all.
[In Class Pane]
Public FontSize As Integer
etc
[In User Control]
strIndex = Panes.Add(??? variables if you have them)
Panes(strIndex).FontSize = UserControl.FontSize
I don't have VB6 with me but if this doesa not help can ive you a fuller example tomorrow.
-- modified at 3:09 Friday 11th November, 2005
|
|
|
|
|
how to display a emerging window before printing by vb
can you helpme please
thanks a lot!!!
|
|
|
|
|
I'd say the reason you got a 1 vote is that no-one can understand the question. You want to show a dialog box before printing ? A print dialog, or a dialog you wrote yourself ? In VB6 or VB.NET ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
When I get registry Values in VB.Net there is no problem unless the Value has a space in it. I have tried parenthesis, tick marks, removing the space, referring to it by index, using underscore in place of the space....
This one works:
Bob = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DDM\Device.1", "ModelName", "Empty")
This one does not work:
Bob = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DDM\Device.1", "Rom version", "Empty")
The problem is the space in Rom Version.
Any Ideas?
Ken
|
|
|
|
|
I've never had a problem with it getting a value who's name has spaces in it.
I would suspect that the problem is more with the registry value type though. What registry type is this "Rom Version"?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You know, I think your right on the money. the two value i have no problem getting are text strings. this one is 4 bytes (52 39 30 32) that when converted to their ascii values = R902, which is right, that is, it is the correct firmware for that drive.
The error message does say - "Conversion from type 'Byte()' to type 'String' is not valid." and
"When casting from a number, the value must be a number less than infinity"
It may just be a coincidence that the Valuename has a space in it and the two the worked did not.
I was planning on getting the value and converting it to ascii.
Thanks for your help!
Ken
(Inventor of the Batch File that will replace VB.NET)
LONG LIVE DOS!! you remember...dos.
|
|
|
|
|
I declared a variable as type Byte and tried that. It said cannot convert from type byte() to type byte which really kinda stumped me. Then I saw that it was an array of bytes (?), right? so I added () to the variable declaration and it works!
Sound right to you or am I going at it completely wrong?
Also, I have to convert these 4 bytes to ascii characters. I'm sure I can figure it out , but do you know of any conversion tools in vb?
Thanks for putting me on the right track!!
Ken
(Inventor of the Batch File that will replace VB.NET)
LONG LIVE DOS!! you remember...dos.
|
|
|
|
|
Ok, I got the ASCII thing too using bob=chr(regvalue(0)).
Thanks again
Ken
(Inventor of the Batch File that will replace VB.NET)
LONG LIVE DOS!! you remember...dos.
|
|
|
|
|
Hello,
I have a set of checkboxes created on a windows form. The state of these need to dynamically set when the form is loading depending on the data coming from the database.
I have tried to use the checkbox.checked and checkbox.CheckState to set the state of the checkboxes, but the state doesnt seem to be remembered. Code as below:
<br />
<br />
ElseIf shelterV.Equals("Quiet South Shelter") Then<br />
selectedShelters.Text = selectedShelters.Text & "Quiet Shouth Shelter" & vbCrLf<br />
log.Message = selectedShelters.Text<br />
log.Category = "Trace"<br />
Logger.Write(log)<br />
QSChkBx.Checked = True<br />
QSChkBx.CheckState = CheckState.Checked<br />
Can anyone please tell me how to set these?
Thanks
|
|
|
|
|
What you're doing is right. There must be other code which is setting the states again.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
mitli wrote: QSChkBx.Checked = True
I think this should read: QSChkBx.Value = vbChecked
...Steve
|
|
|
|
|
Steve Pullan wrote: I think this should read: QSChkBx.Value = vbChecked
Oops... I had a relapse into VB 6.0 Sorry.
...Steve
|
|
|
|
|
I'm having a problem getting a simple "Please Wait..." message to appear while Crystal is generating reports. Is there a simple way to maintain the message on screen until the job is sent to the printer (about 5-10 seconds)?
Thanks for the help.
|
|
|
|
|
Hi,
I am using abit of code to override a datagridcolumn style.
In the onpaint function, the following line draws the text for the cell:
g.DrawString(IIf(Format = "", CType(bVal, String), CType(Strings.Format(bVal, Format), String)), Me.DataGridTableStyle.DataGrid.Font, foreBrush, bounds.X + 2, bounds.Y + 2)
My query is regarding the last 2 parameters, bounds.x+2 and bounds.y + 2
this forces all values in each cell to be drawn left aligned.
Does anyone know a function to calculate the length in pixels of a string?
Then I can right align my cell values by deducting the string length from the cell length.
Any response gratefully appreciated.
Andy
|
|
|
|
|
You can get the width and height of your string via the Graphics.MeasureString() function.
Dim szBuf As System.Drawing.SizeF<br />
szBuf = g.MeasureString("Hello World", Me.DataGridTableStyle.DataGrid.Font)
|
|
|
|
|
Many thanks Joshua,
That solved the problem!
Andy
|
|
|
|