15,896,727 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by diablo22 (Top 61 by date)
diablo22
20-Dec-21 12:35pm
View
need more information than than to manage it, this will not solve fetch information between userPosition and userPicture to display in GenerateDynamicUserControl()
diablo22
24-Sep-20 14:52pm
View
it is clear.
First get the number from my.settings.time
Then timer tick each second reduce progress - 1 until gets 0 then when its 0 show msgbox
diablo22
24-Sep-20 14:47pm
View
something like:
Dim progress As Integer = My.Settings.isBackUpTime
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
Try
progress = progress - 1
'Timer2.Interval = 1
If progress = 0 Then
MsgBox("start copy")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
diablo22
24-Sep-20 14:11pm
View
timer is starting, but i cannot make to read from my.settings.time value and start countdown from 10 - 1 until 0 when get to 0 to display msgbox
diablo22
24-Sep-20 14:03pm
View
it doesnt countdown the value from settings
diablo22
24-Sep-20 13:46pm
View
i cannot manage to do it, my code above not work at all
diablo22
7-Sep-20 13:25pm
View
because i want to store it in program, cause when admin login will have stuff that he can see only in program others will not see it :)
diablo22
12-Jun-20 10:37am
View
Anyway i managed to do it another way and rebuild the code total :)
diablo22
11-Jun-20 11:02am
View
DataDisplay_SelectedIndexChanged i do not have SelectedIndexChanged only SelectionChanged, Datagridview doesn't has this
diablo22
10-Jun-20 16:47pm
View
so you mean i do not need to use inc at the whole source, hmm but my question now is if i use selectedindexchange. For example if i run program and not touch the datagridview and directly click button next record to show, how does it will read to go next row? sorry for stupid question just need to understand logic :)
diablo22
8-Jun-20 13:14pm
View
you didn't understand me correct i will not load pictures that are 1000x1000 or more.
The point of this is to load form and show the picture itself nothing else. Some pictures are small others are little more like little more is (200x150) for example.
Thats why i want the form to be resized as the picture size it is. Its like Preview image form display
diablo22
8-Jun-20 10:46am
View
i also readed about ? and @ and both methods works pretty fine for that and for me @ is much better to make the code
diablo22
8-Jun-20 10:45am
View
yeah i learn fast and manage to do it that is good ;)
diablo22
7-Jun-20 12:33pm
View
i can fix this on later stage, currectly im interested on the function to do it
diablo22
7-Jun-20 10:13am
View
i readed about a little and also number order matter in this call, also the calls must before the command to get the names, also i fixed the parameters that makes problems too to database , now they are equal and correct too
diablo22
7-Jun-20 7:39am
View
i think i found the problem when i use :
.Parameters.AddWithValue("@uName", TextBox1.Text)
.Parameters.AddWithValue("@uNumber", TextBox2.Text)
.Parameters.AddWithValue("@uSupp", TextBox3.Text)
.Parameters.AddWithValue("@uStore", TextBox4.Text)
.Parameters.AddWithValue("@uCount", TextBox5.Text)
Works correct everything...So i need to check out the parameters
diablo22
7-Jun-20 7:17am
View
that is correct, and when i try to update it it fails and says needs 6 arguments, and i think that in picturebox fails to get the data
diablo22
7-Jun-20 6:48am
View
yes, my mistake in copy here, but its just for test i add this to see..that it doesnt recognize to have picture.
The problem comes when execute the query, it doesn run it because it expect 6 arguments
diablo22
6-Jun-20 9:19am
View
yes i sow that and i changed it to -
DatatableName As DataTable
DatatableName = dt
but in form2 doesnt display columns when load
diablo22
6-Jun-20 8:49am
View
if i make it (Datatable As DataGridView1) it will be underline this name as option
diablo22
6-Jun-20 8:42am
View
thanks for information it is usefull to know that cannot call the column name in query.
but any ideas how to then call only datagridview name to display the results even if i remove the table name
diablo22
6-Jun-20 8:40am
View
if i use like Datatable As DataGridView
it cannot do the function Datatable = dt.DefaultView
diablo22
6-Jun-20 8:10am
View
yes that why i write topic, for support how should be where is the problems tips to solve it.
diablo22
31-May-20 11:22am
View
i found this and used it with little edit anad the 3 options password is protected in database so if someone will need it can check it out too thats why i leave it.
diablo22
31-May-20 10:23am
View
You were right i total forgot about the "reserved name" thank you very much, also i sow another problem that i execute 2 times the code so i fix this too now.
About the password protection i didn't understand from the link how to do it.
If you could better explane me how to do it would appriciate it. Thank you.
diablo22
5-Dec-19 11:26am
View
already tried without class name or default the result was the same.
For my bad luck its not working well in vb.net as i need so i need to present everywhere manual dim's and reads. Or i cannot find a better solution for this strange. In c++ do not have that kind of problems, but i'm learning on vb.net now as hobby for me. Will search more if i found solution will write it here
diablo22
4-Dec-19 11:55am
View
i'm idiot maybe...
Public Sub CreateMe()
Dim source As New IniConfigSource(MyConfigFile)
'Read Strings From File
Dim fileName As String = source.Configs("Update").Get("Url")
Dim columns As String = source.Configs("Update").Get("Info")
End Sub
This make strings read correct now...
diablo22
4-Dec-19 11:51am
View
if i build new project and use my code it works...normal
but on my main project it doesn't ...that's what i want to find out why..
diablo22
4-Dec-19 11:42am
View
i sow this topics, but it doesn't describe how can i make it by module to store all stuff inside.
in c++ is easy to pass strings but on vb.net i'm not familar how to do it with module.
For me my code should work, but it doesn't for somehow it stuck on this when debug "Settings.BackUPFolder" looks like cannot read the string text
diablo22
26-Nov-19 6:10am
View
how to make with timer to automatically update listbox1 items inside?
For example in Listbox1 has 3 items (3 folders that are inside folder Created)
- Test1
- Test2
- Test3
this is displayed in listbox1 when form opens (get count of folders and their names and put it in listbox)
If I go to folder Created> and delete folder Test1
With timer inside the form to check does it has something else (to update the listbox items)
So it will check that now it has 2 folders inside Created, and will update Listbox1 with items
- Test2
- Test3
diablo22
25-Nov-19 15:53pm
View
No use databound or other just simple get stuff. Program is vb.net winform.
If i use the tick to use the same function it just add non stop the folder names unlimited. I need some result how to do this in better way
diablo22
18-Nov-19 12:05pm
View
as i mention in my post i have problem with excel stay in task manager, this is temporary fix and close it for sure.
I could not find any good library free for work with excel files thats why i try with default methods (witch is not good option)
diablo22
12-Nov-19 12:44pm
View
the default code that comes with autoupdate .net is added in first post somehow i'm trying to figure it out how to make it in vb.net
When form loads after specific time to check for updates (to call this timer)
diablo22
8-Nov-19 15:52pm
View
as you mention i looked around my code and you were right that i have left empty places for sql injection i just test it myself, so one idea that you mention i will give example so other people may found it usefull too.
Wrong and easy to sql injection query:
.CommandText = "SELECT * FROM users WHERE uname = '" & theForm.txtUsername.Text & "'"
must become like this:
.CommandText = "SELECT * FROM users WHERE uname = @UserName"
.Parameters.AddWithValue("@UserName", theForm.txtUsername.Text)
diablo22
8-Nov-19 15:28pm
View
correctly i fixed it and i do not need using blocks method my mistake was that i was using the same definition 2 times and the catch ex found it and replace it now works like a charm creation of accounts without problems. If user exists = sorry , if not create it.
diablo22
8-Nov-19 15:26pm
View
as far as i read the best option for anti-inject is to use parameters like i do in my function i don't know is it true so far or how to test to make sql inject to see is it going to work
diablo22
8-Nov-19 15:09pm
View
great now all is fine i found that i cannot use here the same for bouth calls
.CommandText = "INSERT INTO users (uname,upassword,ucode,ucreate,utools,usearch) VALUES (@user,@pass,@ucd,@crt,@uto,@usrh)"
.Parameters.AddWithValue("@user", theForm.txtUsername.Text)
.Parameters.AddWithValue("@pass", theForm.txtPassword.Text)
.Parameters.AddWithValue("@ucd", theForm.AdminCheck.Checked)
.Parameters.AddWithValue("@crt", theForm.CreateCheck.Checked)
.Parameters.AddWithValue("@uto", theForm.ToolsCheck.Checked)
.Parameters.AddWithValue("@usrh", theForm.SearchCheck.Checked)
.ExecuteNonQuery()
.Parameters.Clear()
.CommandText = "INSERT INTO personal (pacc,pName,pEmail,pYazaki,pPhone,pPosition) VALUES (@userx,@name,@email,@yazaki,@phone,@position)"
.Parameters.AddWithValue("@userx", theForm.txtUsername.Text)
because it gives error parameter is already defined so i changed it to -> userx and all fine. Thank you
diablo22
8-Nov-19 15:00pm
View
i found it the problem, just visual studio give errors some times and need restart to functional correct.
But your idea was perfect..to give in Function Public Sub RegisterUser(ByVal theForm As UsersAddCP) string to use
Then in button click i just use RegisterUser(me) ,because i cannot use same name it must be me, then the function is called correct and read correct the theForm.txtUsername.Text)
Perfect will make a little tests more to view it and will report back in few minutes
diablo22
8-Nov-19 14:48pm
View
when i do it to change it to like this:
Public Sub RegisterUser(ByVal theForm As UsersAddCP)
...
' Instead of UsersAddCP.Control.Text, use theForm.Control.Text:
.Parameters.AddWithValue("@user", theForm.txtUsername.Text)
...
End Sub
i got underline txtUsername is not a member or UserAddCP
diablo22
8-Nov-19 14:27pm
View
so i need something in form2 when enter fields and click button to use in register some public definitions so can access to form2 information, can you give me a little help or example what must i do for better make the stuff works? even if its other method to make the register working with the panel option. Thank you
diablo22
8-Nov-19 11:34am
View
i had viewed the video, but this is not what i need. I need when execute the module to read the textboxes information, and this video is to send information from 1 form to other in fact this is not what i need, i need when its called the form2 inside the form1 to read the information from textboxes when press the button inside the form2 to create the new account
diablo22
8-Nov-19 6:19am
View
Can you give more details or example what you mean, sorry I couldn't catch your point.
Thanks in advance.
diablo22
8-Nov-19 5:55am
View
thanks I will check it out when I get back at home, because now i'm at work and cannot view it. Maybe the problem is with read/write permissions between the forms and doesn't get what I type in form2 when its called and pressed the button while its active inside the form1. As you mention maybe there is solution for this with pass the values between forms
diablo22
8-Nov-19 4:51am
View
there is no way to solve this problem, because I want to make a more effected program not to display new forms and close previous and stuff like this, something like 1 main form and display features from other forms fill out the information save read that's it not possible?
diablo22
8-Nov-19 4:24am
View
What I want to do is like this:
New Project>VB.net>Form1
In Form1 I have added Panel1
In form1 I have added 1 button to open form2 inside the Panel1 (that in source Form1 is named as AdminMenu)
The code is above to call the form2 (that in source is named UsersAddCP)
So what I have in Form2 (UsersAddCP)
I have 7 textboxes + 4 checkboxes + 1 button to save
Okay so lets begin,
When I click in form1 the button to call the form2 inside the panel1 its working fine.
But when I try to write in the textboxes something and click the button.
The button calls for the function RegisterUser() and inside the database it create new record but with empty fields.
Okay what I try I try to put on Form2 all textboxes (Text = "some default text") and I run the program and without to write anything to the textboxes because they have now default value text and click the button it create in database the records correctly.
So how to fix this problem when I try to enter information to the textbox to record it to the database?
diablo22
2-Nov-19 6:24am
View
it gives error on msgbox(ex.message) this:
Additional information: Conversion from string "System.NullReferenceException: O" to type 'Integer' is not valid.
diablo22
2-Nov-19 6:20am
View
maybe code fails when run because in database i have integer for columns
ucode,ucreate,utools,usearch (they are integer) because need to insert only 1 or 0 in field
and code fail with error on integer maybe this is the roof problem?
diablo22
2-Nov-19 4:58am
View
i already write what error i got with the code above i have problem with the query it cannot execute bouth at the same time only the first one is runned the second one give me error ex.message msgbox and doest insert the information. i do not got any better clue or error that can help me, thats why if there is another way to execute 2 tables at the same time someone to help me out or give example for better way to do it right. Its not recommended to be the same code only to make it work need.
Thanks
diablo22
21-Oct-19 3:59am
View
any example because i do not understand how should it be?
diablo22
21-Oct-19 3:35am
View
in form loads i have this:
If My.Settings.Logs = False Then
enableLogs.Checked = False
Else
enableLogs.Checked = True
End If
diablo22
21-Oct-19 3:05am
View
i try like this:
Private Sub enableLogs_CheckedChanged(sender As Object, e As EventArgs) Handles enableLogs.CheckedChanged
'If enableLogs.Checked = False Then
' Logger.log("[Admin Name: " & lblGetName.Text & "]" & " Changed Option" & " " & "Disable Logs")
'End If
If enableLogs.CheckState = CheckState.Checked Then
Logger.log("[Admin Name: " & lblGetName.Text & "]" & " Changed Option" & " " & "Enable Logs")
ElseIf enableLogs.CheckState = CheckState.Unchecked Then
Logger.log("[Admin Name: " & lblGetName.Text & "]" & " Changed Option" & " " & "Disable Logs")
Else
'
End If
End Sub
and in my log when form loads it records the information when form loads
[10:03:24][Admin Name: admin] Changed Option Enable Logs
any ideas?
diablo22
21-Oct-19 2:50am
View
Okay thank you i didn't noticed how was it, but thank you for the remark will know now for sure.
diablo22
27-Dec-15 10:56am
View
i guest the only problem comes only from here but nobody noticed it
SQLRETURN Result = SQLConnect(this->m_hConnection, (SQLTCHAR *)m_szDatabase, SQL_NTS, (SQLTCHAR *)m_szUser, SQL_NTS, (SQLTCHAR *)m_szPassword, SQL_NTS);
Here if User,Password,Database are wrong return false, check my other topic there doesnt has a problem with connection or infinity loops of application, but it doesnt read database tables
http://stackoverflow.com/questions/34481334/read-custom-string-from-file-in-connection
diablo22
27-Dec-15 10:45am
View
isnt that:
if (SQLGetDiagRec(SQL_HANDLE_DBC, this->m_hConnection, sRecord, SqlState, &NativeError, SQLMsgError, sizeof(SQLMsgError), &MsgLen) != SQL_NO_DATA)
{
//cLog.ConsoleOutput("SQLSTATE:%s, Diagnosis:%s", SqlState, SQLMsgError);
}
diablo22
27-Dec-15 10:17am
View
i do not understand more , i cant fix it myself please help me out to fix the code all day and night i search for solutions on internet, nowhere can find how to fix this
diablo22
27-Dec-15 7:28am
View
so if(Result == SQL_SUCCESS_WITH_INFO)
{
Message(Same)
}
else
{
Message(Not Same Result)
}
It show message SAME..
But if i try like this:
if (Result == SQL_SUCCESS)
{
MessageBoxA(0, "Same!", "Error", MB_OK);
}
else
{
MessageBoxA(0, "Fail!", "Error", MB_OK);
}
Return FAIL , but even if i use correct information for login gives Fail
diablo22
26-Dec-15 13:30pm
View
how to make this please provide me some code so i can test and fix this faster, thank
diablo22
26-Dec-15 11:52am
View
i have in call function this:
void ReadySQLConnect()
{
//cSQL.Connect();
if (cSQL.Connect() == FALSE)
{
MessageBoxA(0, "Failed to connect to Database!", "Error", MB_OK);
::ExitProcess(0);
}
}
But it doesnt work, if my username or password are wrong doesnt show message this is what i want to fix, help me out here
diablo22
26-Dec-15 11:22am
View
to change with what, give me idea, or please show me how it should be
diablo22
26-Dec-15 8:05am
View
so can someone help me to fix this code, i must use information from .ini to get user password and database
diablo22
26-Dec-15 6:39am
View
the problem is that even if i use wrong User and Password it still connect
but if i change Database Name to other wrong, Application is going on looopss.
To solve this i need an check IF USERNAME = WRONG ERROR
IF PASSWORD = WRONG ERROR
IF DATABASE = WRONG ERROR
Simply fix, if all are correct = CONTINUED
Show More