|
I have installed Visual Studio 6.0.
While I am opening a VB project, it is displaying only the code behind; not the user interface. While double-clicking the form in the project window, it displays the message-<The instruction at "0x004581f1" referenced memory at "0x00000000".The memory could not be read.>
& as I am clicking ok,the project is closed.
Although, a new project can be created & run properly.
Kindly help...
Padma Gahlot
|
|
|
|
|
Something is seriously wrong with either the project or the installation of VB6.
Are you sure the project was created in VB6?
Also from where did you install VB6 in the first place? Was it an original CD from Microsoft? Try uninstalling and then reinstalling (not a repair).
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
I have 1 application and I want to count it one time a day by using Proces Control, If user have run it for 30days the application not possible to use and Process Control is maximame
Please anyone know give a code
................
|
|
|
|
|
An easy way would be to write an installation date to the registry (or a hidden file somewhere on the hard drive) and then do a datediff function. If it returns < 30 then run regular code, if not, go to a form that shows how they can register. If you're going to do this tho, you should do some type of encryption of the date so your general user isn't changing the date every 30 days.
|
|
|
|
|
Can u give one example?
................
|
|
|
|
|
He just did.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
It should be from blue to red gradient color...
the backcolors of these rows return green gradient...
please help me revise the code...
thanks...
Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound
Dim red As Integer = &HFF0000
Dim blue As Integer = &HFF
Dim green As Integer = &HFF00
Dim noRows As Integer
Dim incDiff As Integer
Dim currentColor As Integer
noRows = GridView1.Rows.Count
incDiff = (red / green) / noRows
currentColor = green
For x As Integer = 0 To noRows - 1
GridView1.Rows(x).BackColor = Color.FromArgb(currentColor)
currentColor += incDiff
Next
End Sub
|
|
|
|
|
im' not really that good with VB.net but i dont see anything mentioning the color blue in that code. Maybe someone else knows what it is, but im not sure if that's it.
-Think not of the problem But of the solution!
-Mind what people do, not what they say, for deeds will betray an lie.
-The only sovereign you can allow to rule you is reason.
-Contradictions don't exist, in whole or in part.
|
|
|
|
|
Why are you asking the same question again? Follow up in the thread that is already active instead.
---
b { font-weight: normal; }
|
|
|
|
|
I used WebBrowser Contorl in my application when i run it the application run webbrowser to display page correctly, unfortunately the page that contain javascript, ... it alert message as normal.
How can i chnge title bar of alert message?
................
|
|
|
|
|
Hi.... guys
I need a favor from you who have an experience in Overtime calculation, I want to build a program which could counting overtime for each employee in my company,
I need to know how to count the overtime which is over than two days as well , I mean if the overtime is start from 17:00 until 04:00 following days.
Thank you fro your attetnion and your support in advance.
Best regards
ICE
|
|
|
|
|
Include the date in the data, then you can calculate the time difference without problem.
The difference between 2006-06-01 17:00 and 2006-06-02 04:00 is 11 hours or 660 minutes:
Dim start As DateTime = New DateTime(2006,6,1,17,0)
Dim finish As DateTime = New DateTime(2006,6,2,4,0)
Dim minutes As Integer = finish.Subtract(start).TotalMinutes
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa
Thank a lot for your advise and I have tried to write and run those command into a small program but it doesn't working well. I made Three Text box ( textbox1,textbox2 and textbox3), and here is the structure of my program
dim start as datetime
dim finish as datetime
dim minutes as integer
start=textbox1.text
finish =textbox2.text
minutes=finish.subtract(start).totalminutes
textbox3.text=minutes
I tried to run this program but it wont be runing propherly it just has 0 as the result came up on the textbox3
I am affraid that I have made a mistake, but I have no idea how to write the right logic program for this case. If you don't mind please let me get your next advise
Thank you
Best regards
ICE
|
|
|
|
|
Despite the total disregard for data types, it looks like the code should work. What did you enter in the textboxes?
---
b { font-weight: normal; }
|
|
|
|
|
Hi every body,
I'm workin on a vb.net 2003 ,and on an Access db.
I've the table :"CarParts" has these columns(PartNo,PartName,Price)
and I've a question I hope someone could help me to solve it.
I've a checkedlistbox,and I binded it to (PartName)column .
when I check an item I want it's name to be added to a textbox to save in a specivic column,and it's price to be added in another txtbox just to get the sum of all the checked items.then I would be able to save the whole selected items written in this textbox to save them in another column and I will be abel to save the sum of all the selected items in another column .
I did it by usuing the checkbox tool and it succeeded,according to the next code where i binded the Price column to one Label just to help me doing the sum,this label work even if i updated the prices:
if checkbox1.checked the <br />
bmb.position=0 <br />
sum += Val(Label 1 .text) <br />
textbox1.text & = " the 1st car part name" <br />
end if <br />
if checkbox2.checked the <br />
bmb.position=1<br />
sum += Val(Label 1 .text) <br />
textbox1.text & = " the 2nd car part name" <br />
end if <br />
.<br />
.<br />
.<br />
etc..<br />
Here is my CheckedListBox code it's just loading the (PartName)column data ,what Should I add to make it do the checklistbox job, pleeeeease help me:
Code:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click <br />
Dim strcon As String <br />
Try <br />
strcon = " provider=microsoft.jet.oledb.4.0;datasource=Cars.mdb " Dim con As New OleDbConnection(strcon) con.Open() <br />
Dim adapter As New OleDbDataAdapter("select * from CarParts", con) <br />
Dim cn As OleDbConnection = New OleDbConnection Dim dset1 As New DataSet <br />
Dim dt As New DataTableadapter.Fill(dt) CheckedListBox1.DataSource = dt CheckedListBox1.DisplayMember = "PartName" <br />
Catch ex As Exception <br />
MessageBox.Show(ex.Message) <br />
<br />
End Try <br />
End Sub
-- modified at 2:28 Friday 2nd June, 2006
|
|
|
|
|
I was given this code when I asked if anyone knew how to check if a user of my Visual Basic program is connected to the internet so that I can handle "Page cannot be displayed" errors, however I am a newbe to visual basic and this code does not make any sence to me, nor do I know how to use it...
Can someone explain what steps I would follow to impliment this code? For example, where do I put this code? How do I call the function?
Thanks.
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef _
lpSFlags As Long, ByVal dwReserved As Long) As Long
Const INTERNET_CONNECTION_MODEM = 1
Const INTERNET_CONNECTION_LAN = 2
Const INTERNET_CONNECTION_PROXY = 4
Const INTERNET_CONNECTION_MODEM_BUSY = 8
' return True if there is an active Internect connection
'
' optionally returns the connection mode through
' its argument (see INTERNET_CONNECTION_* constants)
' 1=modem, 2=Lan, 4=proxy
' 8=modem busy with a non-internet connection
Function IsConnectedToInternet(Optional connectMode As Integer) As Boolean
Dim flags As Long
' this ASPI function does it all
IsConnectedToInternet = InternetGetConnectedState(flags, 0)
' return the flag through the optional argument
connectMode = flags
End Function
|
|
|
|
|
Hi
What type of project are you running - exe, dll etc.
Normally, you would put it in a class/module and call the function. For a better reply, you need to give more info.
Regards
Shreekar Joshi
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
I am creating a .exe file in visual basic. I have a button and a web browser (the standard one that you add from the toolbox) setup to load a webpage in a the web browser when the button is clicked. I am trying to stop the "Page cannot be displayed" page from loading if the user of my program is not connected to the internet, so I want to be able to check if the user is online that way I can route them to an offline version if necessary.
My code looks like this:
Public Class Form1
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://www.google.com")
End Sub
End Class
Thanks again for the help!
|
|
|
|
|
Hi
In the button click procedure, just call the CheckInternetConnection function. If it is true, then navigate to the internet site, otherwise, show the user offline version.
However, you will need to put the declaration and definition of the function in a public module and make the function public as well.
HTH
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
I used to have an event listener (Back in my AOL PROGZ days... that allowed you find and address an object via VB to manipulate it or make a simple listener.
I have a program that I use at work that is written in poor VB. There is a button in this program that changes captions, and I would like to create a program that makes a sound when the button's caption changes. This is why I need to find the external event listener that I once had...
If anyone can help (or pose an alternate solution) I would really appreciate it. Thanks!
- Gabe
-- modified at 1:59 Friday 2nd June, 2006
|
|
|
|
|
Hi guys,
Here's what i want to do w/ the module.
I want to declare my connection properties in the module so i can just call
it w/in my forms whenever i have to use it.
here's whats inside my module
Imports System.Data.OleDb
Module mod_con
Public Sub establish_con()
Dim con_db_ssr As OleDbConnection
con_db_ssr = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\i1984\Automation\db_ssr.mdb;")
End Sub
End Module
am i doin it ryt? then i want to call it...
tnx.
-::maximus::-
-- modified at 23:15 Thursday 1st June, 2006
|
|
|
|
|
Hi
SO what is the question - or, what is the error? You seem to be doing it right if all you want is to expose the Connection open code as a function. If you want to do something else, please post the error/question/intention.
Shreekar
http://shreekarishere.blogspot.com
|
|
|
|
|
Hi, I saw this project:
http://www.thecodeproject.com/csharp/OazSwitchNetConfig.asp?df=100&forumid=43385&select=1513418&msg=1513418[^]
and tried to make it on VB. NET, Im really new with this, and I cant contionue because I cant convert the system.string[] into a normal string, I have everything equal, and when I make this:
For Each mgr As ManagementObject In management.GetInstances()
If mgr.Item("IPEnabled") Then
txtDireccionIP = mgr.Item("IPAddress").ToString()
Exit For
End If
txtDireccionIP variable just show system.string[], why? because is an array?, I tried split it, get elements with a for each but nothing, what Im missing?
Thanks everyone...
Mauricio Rodriguez
newbie
|
|
|
|
|
I have a progam created and all ready to install. I used the VB.NET setup project for my deployment in Visual Studio 2005. My setup project uses prerequisits of the .NET Framework 2.0, MDAC, and a Windows Installer. Running the setup works fine, except on a computer where the user logged in does not have admin rights. When this occurs the setup fails and displays a very cryptic error. Does anyone know how I can somehow check if the user installing my program has admin rights, so that I can display a nice professional message notifying them that they need admin rights instead?
|
|
|
|
|
Kschuler wrote: When this occurs the setup fails and displays a very cryptic error
What do you mean by cryptic error. As far as I know, windows display a message box "Access denie...". I think this error is manage by windows because your application is running in windows.
|
|
|
|