|
i need to build an application that would first connect trough LAN, if that fails (outside LAN) trough internet, and if that fails trough modem, offcourse it is a database it should connect to. My problem is that i have no idee how to do this, any suggestions?
John
|
|
|
|
|
I am making an FTP Class I've been able to login,get filelist,enter into passive mode. but when I try to download any file as small as 1 Byte it stops responding I'm issuing ("RETR " & Filename) command to FTP Server. If there is any problem correct me.
Do While True
m_bytBuffer.Clear(m_bytBuffer, 0, m_bytBuffer.Length)
m_intByte = m_objClientSocket.Receive(m_bytBuffer, m_bytBuffer.Length, 0)
m_strMes += ASCII.GetString(m_bytBuffer, 0, m_intByte)
If (m_intByte < m_bytBuffer.Length) Then
Exit Do
End If
Loop
|
|
|
|
|
Hi,
vb 6.0
I have a control with several events, and a container form listening for such events. the control also has some methods which are called by the container form to update a listview.
Everything was working fine until I decided to compile the project. when compiling the project I get the message: procedure not found -- even though intelisense allows me to select the procedure and I provide the correct number of arguments (4 args).
Does anybody have any experience with this type of behaviour, I'm in the process of creating the release version for testing and can't seem to go past the compile process.
Thanks....
sun.lcr
|
|
|
|
|
Hi folks,
Solved my problem, I'm so deep in the forest that I can not see clearly...
anywho....
I had changed the function signature but did not bother to recompile the control project. Since the control project is in the same workspace as the form project calling it, I was making the wrong assumption that everything was getting compiled but the control project was not getting compiled therefore the diffrerence in method signatures....
duhhhhh.....
sun.lcr
|
|
|
|
|
Hi,
I am trying to convert the code in this document: http://www.codeproject.com/cs/miscctrl/custommenu.asp[^] into VB.net instead of C#. I have got most of it done but I am missing the final step, or at least I hope it is the final step. In the article all the menuitems have the following two events added:
this.menuItem3.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.OnDrawItemSec);
this.menuItem3.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.OnMeasureItemSec);
When I look at the source article used for this article, the author writes about going to the eventtab on each menuitem. I am guessing this is typically C# as I cannot find it in VB.net. So can anyone please tell me how to do this?
Thanks
David J
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
Your are looking for the AddHandler statement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmAddHandlerStatement.asp
For your example:
<br />
AddHandler Me.menuItem3.DrawItem, AddressOf Me.OnDrawItemSec<br />
AddHandler Me.menuItem3.MeasureItem, AddressOf Me.OnMeasureItemSec<br />
|
|
|
|
|
Could someone please help me on how to disable database login in crystal report 9.0?
Here's how I did:
I created a customer.rpt file
then I wrote this code to call customer.rpt to make the report:
-------------------------------------------------------------------------
Private Sub CustomersPrintForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim CRYRpt As New Customers
Dim rst As MICControlLibrary.RecordSet = MICControlLibrary.DBContacts.DBSelectPrint(_contact_id)
Dim dtview As DataView = New DataView(rst.DataTable)
CRYRpt.SetDataSource(dtview)
Dim ParameterFields As CrystalDecisions.Shared.ParameterFields
Dim ParameterField As CrystalDecisions.Shared.ParameterField
Dim ParameterRangeValue As CrystalDecisions.Shared.ParameterDiscreteValue 'ParameterRangeValue
ParameterFields = New CrystalDecisions.Shared.ParameterFields
ParameterField = New CrystalDecisions.Shared.ParameterField
ParameterField.ParameterFieldName = "@contact_id"
ParameterRangeValue = New CrystalDecisions.Shared.ParameterDiscreteValue 'ParameterRangeValue()
ParameterRangeValue.Value = _contact_id
ParameterField.CurrentValues.Add(ParameterRangeValue)
ParameterFields.Add(ParameterField)
CrystalReportViewer1.ParameterFieldInfo = ParameterFields
CrystalReportViewer1.ReportSource = CRYRpt
CrystalReportViewer1.Refresh()
End Sub
----------------------------------------------
am I missing something? because when I run it, it prompt a database login asking me to login before view the report?
Thanks for helping.
|
|
|
|
|
hi
i mohammed
i from egypt
sorry i cannot help you but with vb6 and crystal report 8.0 i used crs1.Connect = "PWD=EMP" and Emp this my Password and crs1 is crystal report ocx
but can you help me how i used crystal report 8.0 from vb6 and haow save pucture un database and view them with image controls Or picture controls in vb6
mohammed hussein
|
|
|
|
|
Looking for some help please...
I can draw a 'Grid' on a form through OnPaint using Drawline methods -
I need to associate data from an array to this grid I draw and label. (I have no issues with working with arrays, not the question)
example: the grid I draw is a 10 x 10 labeled on the x/y axis appropriately 1 - 10. My data comming in is points associated with my grid (3,5) (2,7) etc.
So I would like to plot this.
However, the location on the FORM for where I have my grid set up as (1,1) for example, is actually (25, 75) (lets say) and these values will change as I resize the form -- But I still need to have my array data plotted on the (1,1) location I created in my grid.
Hehe..make sense what I am confused about?
How do I get my array data plotted & associated to the grid I create and not the underlying coordinates used by the Form itself that the grid is created on?
Appreciate any feedback.
I am including the code I have so far - it works nice as a basic grid creater I guess.
To change the dimensions, you change the "Space" variable.
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
'This is the declare of the graphics object
Dim g As Graphics = e.Graphics
'Size Variables
Dim gWidth As Integer = Me.ClientSize.Width
Dim gHeight As Integer = Me.ClientSize.Height
'Grid Spacing
'Will use a unit of 10 for the # plots to be used, defines grid spaceing
' will change to variable setting
Dim Space As Integer = 10 'this would be variable - # of plots defining size of graph
Dim xSpace As Integer = (gHeight - 10) / Space '-10 to allow 5 on top and bottom extra space
Dim ySpace As Integer = (gWidth - 10) / Space
'ADD LABELS
' will be written in with each line made
' x and y axis
Dim Label As String
Dim myFont As New Font("Tahoma", 10)
'Declare the Pen
Dim pPen As Pen = New Pen(Color.Maroon, 1)
'DRAW THE X HORIZONTAL LINES for grid
'Draw first line - bottom
'Draw a line x1, x2, y1, y2
g.DrawLine(pPen, 1, gHeight - 5, gWidth - 5, gHeight - 5)
'LABEL
Label = 1
g.DrawString(Label, myFont, Brushes.Blue, 1, (gHeight - 15))
'set up loop to draw remaining lines
Dim counter As Integer 'counter for loop
counter = Space - 1 '1st line has already been drawn
Dim n As Integer ' holder/count for loop
Dim x1Space As Integer = xSpace
For n = 1 To counter
'set up x1,x2,y1,y2 for next line to be drawn
g.DrawLine(pPen, 1, (gHeight - 5) - x1Space, gWidth - 5, (gHeight - 5) - x1Space)
'Label
Label = System.Convert.ToString(n + 1)
g.DrawString(Label, myFont, Brushes.Blue, 1, (gHeight - 15) - x1Space)
x1Space = x1Space + xSpace 'adds next space value to move line up
Next
'DRAW THE Y VERTICLE LINES for grid
'draw 1st line starting left -> right
'draw a line x1,x2,y1,y2
g.DrawLine(pPen, 5, 5, 5, (gHeight - 5))
Dim y1Space As Integer = ySpace 'need to use the ySpace now for spacing vertically
counter = Space - 1
For n = 1 To counter
g.DrawLine(pPen, (5 + y1Space), 5, (5 + y1Space), (gHeight - 5))
'Label
Label = System.Convert.ToString(n + 1)
g.DrawString(Label, myFont, Brushes.Blue, (5 + y1Space), (gHeight - 15))
y1Space = y1Space + ySpace
Next
End Sub
Protected Overrides Sub OnResize(ByVal e As System.EventArgs)
Me.Invalidate()
End Sub
End Class
SO its possible I am even approaching the whole problem incorrectly with what I have done above. The thought was to create the grid and then plot on it.. eventually the "Space" variable will be determined by first looking though the array for the min max values and constructing the grid and graph from there..
But first I need to figure out how to plot the !@%$#@! thing...
Thanks to all who took the time to read this.
Andrew
|
|
|
|
|
open.ShowDialog()<br />
Dim myObjectsFromFile As New CPersonalList<br />
myObjectsFromFile.LoadPersonalObjects(open.FileName)<br />
Dim i As Integer<br />
For i = 0 To myObjectsFromFile.GetObjectCount - 1<br />
lvwObjects.Items.Add(myObjectsFromFile.getObject(i + 1).First)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Second)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Horoscope)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Fourth)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Fifth)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Sixth)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Seventh)<br />
lvwObjects.Items(i).SubItems.Add(myObjectsFromFile.getObject(i + 1).Eighth)<br />
Next
Data form text file: 000189,380661,SUPERSTAR VIRGO,410081,0813,2.200,5.76,12.67
I have the above code which sucessfully place data extracted from a Coma delimited text file in Column 1-8 of a ListView which have 12 ColumnHeader.
Problem:
How can i specify the column of the data to be display in?
E.g. Puting myObjectsFromFile.getObject(i + 1).Second in the 12th column instead of the 2nd, the myObjectsFromFile.getObject(i + 1).Third in the 9th column instead of 3rd .etc
Note: Juz a sample break down of what i need to do as my actuall requirement is slightly mroe complex
|
|
|
|
|
Is there any build-in function of Visual Basic .NET that lets me extract the dates from a GregorianCalender based on a given weeknumber of a given year?
For instance, extracting what dates belong to week 19(as an example) of a given year?
Thanks in advance.
Regards
Alsvha
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
hi guys i have a problem. i want to use overture and adwords search engine in my vb.net . can any body knows from where i can get these search engines web services thanks.
hammad umar
|
|
|
|
|
:-Dhai... everyone.. who know how to use the vb.net to perform the silent installation?
For this purpose, because i want to perform install s/w program that means can install program at 10 client pc at ths same time.
Actually, i want use the install.inf file to perform the silent installation, but i also dont know the command for .inf file.
So,;) everyone who know about this!!! that give me some guideline(web site or coding) to do this.....
Thanks you!
|
|
|
|
|
I have a problem, this is show, display on form or textbox,.. chemical formula and mathematical formula and display it on report.
example:
I want display 10^12 with 12 above 10.
Who can help me?
yessss!!!!
|
|
|
|
|
Hi, Can anyone help me from here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I could solve it now. Just replace * with %.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I'm using vb.net and I have 1 form with a webbrowser control on it, and one button on the form.
I have an html page I'm calling which has 2 radio buttons on it and a textbox.
I can fill in the textbox by going...
AxWebBrowser1.Document.Forms(0)("username").Value = "myusername"
My problem is, I'd like to select a radio button depending on its value...
How could I do that? I'd like to be able to select a radio button based on its value if at all possible....
I found a page on HTML Document Object Modeling here...http://www.w3schools.com/htmldom/dom_obj_radio.asp but cant quite get it figured out.
Thanks for any help!
----------------------------------------------------------------------------
Heres My current code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim Choice As String<br />
Choice = 2<br />
<br />
If Choice = 1 Then<br />
AxWebBrowser1.Document.forms(0).radiobutton.value(1) = checked<br />
ElseIf Choice = 2 Then<br />
AxWebBrowser1.Document.forms(0).radiobutton.value(2) = checked<br />
End If<br />
End Sub -------------------------------------------------------------
Here's the body of the page I'm using
<body> <br />
<form name="form1" method="post" action=""> <br />
<input name="radiobutton" type="radio" value="1"> <br />
<br> <br />
<input name="radiobutton" type="radio" value="2"> <br />
<br><br />
<input name="username" type="text" id="username"> <br />
</form> <br />
</body>
|
|
|
|
|
I am writing a routine which will display part of a jpeg image (say 3500x2000 pixels) in a PictureBox (size 1000x700 pixels) and then allow the user to scroll around the image by using the mouse (image scrolls whenever the right mouse button is pressed and the mouse is moved).
I am using Graphics.DrawImage to redraw the scrolled image.
gphpicbox.DrawImage(picturebox1.Image, New Rectangle(0,0, _
picturebox1.Width, _
picturebox1.Height), _
New Rectangle(intrelmoveX, intRelMoveY, _
picturebox1.Width, _
picturebox1.Height), graphicsunit.Pixel)
My problem is it is just so slow and not at all smooth.
Is there anything I can do to improve performance?
Thanks
NagaJim
|
|
|
|
|
From where does the gphpicbox object come from?
If you draw the image yourself I wouldn't use the picture box control (it is only useful when you let it paint the image itsself). Make your own Control (derive from control or userControl) and override the OnPaint method. Here you can do your drawings (the Graphics object can be retrieved from the eventargs). While the mouse is moving just set the appropriate properties and call YourControl.Invalidate(). That should do it.
Greetings Robert
|
|
|
|
|
Hello
I suspect that this is a simple error on my part but this example may help others starting out with ADO.NET.
I'm working on a very basic Database Application. I've included the full project as an attachment in this post.
Its a very basic Form that is the front end for a database containing contact information.
The form has many fields but I've only implemented the first 4 for simplicity.
The form has 4 buttons
1-Find = user enters record ID to bring up the contact information for that record (SQL Select used)
2-New = user can create a new record (SQL Insert used)
3-Save = user saves current record (updated or new- SQL Update or insert used)
4-Delete = Record deleted
I have used an access DB for simplicity but will need to use MySql or MS SQL for end project. Amen.mdb is included with project.
Parts That Work
1-Find Works OK
2-New Works OK until Save
Parts that Don't work
3 - Save - Insert only inserts the first 2 fields in the database! ie name & contact, phone & mobile don't get inserted! -
I don't understand this as the code seems OK
Update doesn't work at all - it causes an unhandled exception in the cmdUpdate part of my code.
The project was written in VS.NET 2003
Any Help greatly appreciated
Tino
--------------------------------------------------------------------------------
zipped up project
www.itsthere2share.com/Amen2.zip
|
|
|
|
|
I try to download your zip file, when it complete I could not open it. The message said that your zip file is not a valid archive. You can send me an e-mail to kanel@scn.online.com.kh or you can post the code of Find record and the code Save record. Because I want to compare what is the difference between the working code and that you code that you have a problem.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I've seen the C#/J# article to handle this, but does anyone know of a way to do it directly from VB.Net code?
Charlotte
|
|
|
|
|
Sure you can. I dont know which article you are exactly referring to but I think you can do it nearly the same way with VB.Net.
With J# many assemblies are bundled together which mimic the behaviour of the Java libraries. These assemblies are normal .Net assemblies and can be used from any of the .Net programming languages.
So if you have J# installed you just have to reference the appropiate libraries in your project and use them as needed.
|
|
|
|
|
CharlotteF wrote:
I've seen the C#/J# article to handle this, but does anyone know of a way to do it directly from VB.Net code?
What do you mean by directly? Does the library have to be written in VB .NET? If not you can use pretty much any available managed implementation and add either a reference to a compiled assembly to your project or add another project to your existing solution. Either way you will be able to use the classes from the library no matter in which programming language they are/were written. Maybe you should have a look at the #ziplib[^].
Best regards
Dennis
|
|
|
|
|
I have what I suspect should be a simple question. I need to know how to call and pass parameters from a Visual Basic .NET program to a Visual C++ .NET program. Any help would be appreciated.
Thanks,
Marek
|
|
|
|
|