hi I have datagridview which i want to add on several forms. Number of columons and all ather functionality remains the same. to avoid creating size, columns, column names each time, i am trying to create class control for datagridview which will give me by default number of columns and size once i add the datagrid to form. i have tried this . **But it shows ten columns instead of five** . attached picture Public Class ClsDgvJournal Inherits DataGridView Public Sub New() Width = 500 Height = 200 Dim Col1 = New DataGridViewTextBoxColumn With {.HeaderText = "AAA", .Name = "A", …

Member Avatar
Member Avatar
+0 forum 11

Hi, I have checked all the prior forum questions on this topic, but none of the options seem to be working for me. I am creating an output file that goes into a specific folder for getting MP3 file information. When I run inside of Visual Studio Community 15, it works great ... no errors. When I take the EXE and create a new folder for the actual application and run by itself is when I get the error. I have tried turning on the UAC to Admin rights, with no luck. Here is my code Private Sub cmdCreateFile_Click(sender As …

Member Avatar
Member Avatar
+0 forum 5

Hi All Brothers I am working on ERP system and i need one help I wrote code for Datagrid auto complete. this code is working perfect but it only showing one Column record from database what i need is i want first column is to autocomplete as i did and it should fill related columns automatically linked with first column. please guide me with Codes many Thanks My Code Dim strConn As String Dim da As SqlDataAdapter Dim conn As SqlConnection Dim ds As New DataSet strConn = ("Server= DESKTOP-QN6F623; Database = stock_in;Integrated Security = false;User ID=dis;Password=0m3rP@ss") conn = New …

Member Avatar
Member Avatar
+0 forum 3

Let's say you want to send a short private message to your friend, but don't want grandma to snoop around and find it. One way is to use the Python Image Library (PIL) and hide the message in a picture file's pixels. Just looking at the picture you will barely detect any difference between the before and after picture. All your friend needs is the decode_image portion of this simple code to get the message back.

Member Avatar
Member Avatar
+5 forum 15

What useful plug-ins / debuggers for Visual Studio do you use (for Windows)? P.S. I know Visual Studio has a good debugger)

Member Avatar
Member Avatar
+0 forum 2

Hello, I need help on getting solution for the below python code. The code gives the required output which is that it dispaly number of prime number that user wants. if user inputs 4 Actual Output: 2, 3 , 5 , 7 The main question is that I do not have idea on how to give rank to those prime numbers. For Example: The 1st prime number is 2 The 2nd prime number is 3 The 3rd prime number is 5 The 4th prime number is 7 and so on. Can anyone please help to write the code to get …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have the program, which is a traffic simulation, and I have a few linked lists in it. I'd like to ask you what is the easiest way to check if I don't have duplicats in them? The code which runs it looks like that: public static void main(String[] args) { Simulation s = new Simulation(); s.addRoad(Road.Orientation.HORIZONTAL, 50, 5,3); s.addRoad(Road.Orientation.HORIZONTAL, 500,1,4); s.addRoad(Road.Orientation.VERTICAL, 100,3,2); s.addRoad(Road.Orientation.VERTICAL, 600,2,3); s.addRoad(Direction.DOWN, 1,300, 2,3); s.addRoad(Direction.RIGHT, 3 ,340,1,2); s.addRoad(Direction.UP,0,500,2,1); s.addRoad(Direction.LEFT,2, 400,1,2); s.addIntersection(0,2); s.addIntersection(3,0); s.addIntersection(2,1); s.addIntersection(1,3); s.start(); } Simulation extenst Thread, so first I build road system, then add intersection (if there is a T shape intersection …

Member Avatar
Member Avatar
+0 forum 1

I have a table that contains some cubes with servers and active status (see attached image): note: CUBE1 is repeated intentionally. The idea is the same cube is getting synced from the same server 1 as a data source (process_server) onto different target servers (query_server; say server2 is in region A and server 3 is in region B). The way the environment is set up is both servers have to be active/active status (meaning TRUE) except for some additional test cases, i am setting to false sometimes one or the other. I have the following script now calling the cube …

Member Avatar
Member Avatar
+0 forum 2

To be honest with you, all the codes that i made were self taught, i had to advance myself to learn more stuff in C++ which my first challenge is to make a simple but clean made text based adventure game, but im at the wall atm. (don't judge me, i'm still a newbie to C++) One is making choices, i tried doing "if" then "else if", on my last project, and it always reads the first "if", making the other two choices non-readable, so i had to force myself to make only one choice (hence making it a game …

Member Avatar
Member Avatar
+2 forum 2

import csv import xlwt import os import sys #import openpyxl # Look for input file in same location as script file: inputfilename = os.path.join(os.path.dirname(sys.argv[0]), 'book2.txt') # Strip off the path basefilename = os.path.basename(inputfilename) # Strip off the extension basefilename_noext = os.path.splitext(basefilename)[0] # Get the path of the input file as the target output path targetoutputpath = os.path.dirname(inputfilename) # Generate the output filename outputfilename = os.path.join(targetoutputpath, basefilename_noext+'.xls') # Create a workbook object workbook = xlwt.Workbook() # Add a sheet object worksheet = workbook.add_sheet(basefilename_noext, cell_overwrite_ok=True) # Get a CSV reader object set up for reading the input file with tab delimiters datareader …

Member Avatar
+0 forum 0

Hi guys, i'm having a difficulty to set the path in vb.net.i put the code in the module and every time i run the code it throws error "Could not find file 'C:\Users\Abdueie\Desktop\BMS\Bridge Asset Management\Bridge Asset Management\bin\Debug\Adigrat.accdb'." here's the code Public conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source= .\\Adigrat.accdb;Persist Security Info=False")

Member Avatar
Member Avatar
+2 forum 10

Hi. I want to detect a face and draw line exactly around the face to crop it. I searched a lot and used the EmguCV face detector. but now my code just draw a "rectangle" around the face and if I crop it, I will have a rectangle with a face inside it and it's not useful for me. this is the core of my simple code: CascadeClassifier _cascadeClassifier = new CascadeClassifier(Application.StartupPath + "/haarcascade_frontalface_alt_tree.xml"); using (var firstImage = Image.FromStream(saveImageStream)) { var bgrImage = new Image(new Bitmap(firstImage)); Image grayFrame = bgrImage.Convert(); var faces = _cascadeClassifier.DetectMultiScale(grayFrame, 1.01, 1, Size.Empty); foreach (var face …

Member Avatar
Member Avatar
+1 forum 1

I'm trying to make this queue program for school to take the next packet out of my queue (therefore delete it) in the queue function : struct packet_t *queue_retrieve(struct queue_t *queue) in line 73. I know that i have to use my write and read but i fail to understand how exactly. I also have to implement it as a circular buffer so when it reaches the end of my queue it starts at 0 again. Also is it enough to free(q) and (p) in order to delete packets/queues like i did in the queue_destroy and packet_destroy functions or do …

Member Avatar
Member Avatar
+0 forum 1

Hi, I'm working as a Software Engineer. You can imagine, how will be my work? I used to work when I'm in my home too, especially, during the month ends. The problem is, I'm not able to access my internet during the day time .there will be a connectivity problem. Planning to replace the internet box at home . It's disgusting to use it. But instead of being attached to a phone cable, my friend suggested the replacement of cable and placing portable internet solutions. I enquired about the connection and heard that a portable WiFi device enables us to …

Member Avatar
Member Avatar
+0 forum 1

two error come of (strcpy was not declare in this scope) would any one show me, hw to remove this error, ... plz Project Title: Student Record & Registration using Linked list Description: This project is a Linked List application. If you would like to refresh you knowledge about linked list, you may read this article: Linked List. The project considers an engineering university having three departments: Electrical, Mechanical and Comptuer System Engineering(CSE). The university considers Metric(O-level) , FSc(A-level) and entry test marks for registering a student and calculate an aggregate based on a specific criteria. The project finds in …

Member Avatar
Member Avatar
+0 forum 2

Hi, something weird happened with my program, I mean when I run it I see only grey frame (like I had only JFrame object in my app), then I minimalize application, maximalize it and only then I see all components painted (JButton, rectangels and lines inside Jpanel,...). Changing of frame size helped too, but now I have fixed size, so this is not anoption. Can you tell me what can cause that behaviour. This is class which draw everything: public class Simulation{ JFrame frame; JPanel background; RoadSystem roads; Stats stats; Settings settings; JButton startButton; public Simulation() { frame = new …

Member Avatar
Member Avatar
-1 forum 2

Background: I'm looking to program and sell (on the Mom & Pop circuit) some internet-enabled devices. They need to be pre-configured in-store by a non-techie. The device will come online with a DHCP address. I need to find it, send it customer-specific configuration changes, then wrap it up for the customer. The project manager knows that the target demographic will likely not want the hassle of making changes to the product after the initial config. OK, so I have a device with an auto-IP that I need to SSH into. To my limitied knowledge, I can do this in two …

Member Avatar
Member Avatar
+0 forum 3

Getting error when showing data in list view, please help me..... Error :* Cannot add or insert the item '10-07-2018' in more than one place. You must first remove it from its current location or clone it. Parameter name: item* I use Vb.net 2010 visual basic sql server 2008 r2 stored procedure one listview I want this type of structure (example) id date item_name qty. amount 1 1/1/2019 a 2 10 B 1 12 x 14 100 zz 4 52 2 4/1/2019 M 5 80 N 4 50 But when I showing to the data 1st item show on list …

Member Avatar
Member Avatar
+0 forum 4

I would like to create a Microsoft Access database and integrate it into my VB.net application. I am also hoping to distribute this application to others. My concern though is whether or not users who download my application will also need Microsoft Access in order for the database (and app) to work properly. Will the app still be able to create, modify and delete records if the users themselves don't have Access? Should i be looking into a different database software?

Member Avatar
Member Avatar
+0 forum 1

i have a mssql datagridviewer. i only need when user load the form..they must get empty datagrid...data only show when they search any item or add item....i worked on search and add but i am confused on load event ....please help with code

Member Avatar
Member Avatar
+0 forum 1

I have a text file with the following contents: Andrew Law 32 6'1 123 Pounds Tom Harris 19 5'5 180 Pounds Randy Poffo 45 5'3 141 Pounds Now on my form i have a listbox and four labels. What i would like to do is have the listbox show only the names of the people in the text file (Andrew Law, Tom Harris, Randy Poffo) and when the user clicks the persons name in the listbox i would like each of the labels to show the corresponding details for that person (one label showing age, one showing their height and …

Member Avatar
Member Avatar
+0 forum 2

Hi. I'm trying to create a Traffic simulator and I'm stuck on how to get a Car object to turn into a road. I've managed to have a car go straight (which is really easy anyway lol) but I can't really find a way to get it to turn into a road, specifically a left turn. The code I have currently is this: [CODE]import java.applet.*; import java.awt.*; import java.awt.geom.AffineTransform; public class Traffic3 extends Applet implements Runnable { //thread variables Thread t; int i; //double buffer variables Image offscreenImage; Graphics offscr; int width; int height; //car //coordinates for lanes //south road, …

Member Avatar
Member Avatar
+0 forum 9

I have questions: 1) Program to get input from user till 'z' or 'Z' is inputted the program will check for the chars, and print (new line) small chars (new line) big chars (new line) numbers [without 'z' or 'Z'] can't use variables. only Stack. example : input: ASdf154sdgdf123vcvbz Small chars: dfsdgdfvcvb Big chars: AS Numbers: 154123 This is code for question 1: STA SEGMENT STACK DB 100H DUP (0) STA ENDS CODE SEGMENT ASSUME CS:CODE,SS:STA MAIN: MOV BP, SP MOV BX, BP SUB BP, 2 MOV CX, 0 INPUT: MOV AH, 01H INT 21H INC CX CMP AL, 'z' …

Member Avatar
Member Avatar
+0 forum 1

I have a worksheet of about 388 items that each item is exported into a template worksheet that is created to itemize each item. It creates the worksheets but I can't get it to stop looping at the line of code in bold comments icons. The line that it stops at is to name the worksheet from the column "A" of the list of 388. I have shorten the list to work on the code. So when I'm done I would have workbook of 388 worksheets from the template made. The template worksheet name is "wbs_template" (hidden). I have attached …

Member Avatar
Member Avatar
+0 forum 11

Initially, I've a simple program to print out the whole output to the console. **Initial Code to display output in the console only** import os, subprocess print("1. Before") os.system('ver') subprocess.run('whoami') print('\n2. After') **Output in console** 1. Before Microsoft Windows [Version 10] user01 2. After Then, I decided to have a copy on a log file (log.txt) too while maintaining the original output to the console. So, this is the new code. import os, subprocess, sys old_stdout = sys.stdout log_file = open("log.txt","w") sys.stdout = log_file print("1. Before") # This appear in message.log only, but NOT in console os.system('ver') # This appear …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have two problems with application I write in Java. Now it looks like that: import java.awt.*; import javax.swing.*; public class Main{ public Main() { JFrame frame = new JFrame(); frame.setSize(1200,900); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); JPanel background = new JPanel(new GridBagLayout()); background.setBackground(Color.lightGray); LeftPanel lp = new LeftPanel(); background.add(lp, new GridBagConstraints(0,0,1,3,3.0,1.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 10, 10, 10), 0, 0)); Stats stats = new Stats(); background.add(stats, new GridBagConstraints(1,0,1,1,1.0,1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(10, 10, 10, 10), 0, 0)); Settings settings = new Settings(); background.add(settings , new GridBagConstraints(1,1,1,1,1.0,1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(10, 10, 10, 10), 0, 0)); JButton button = new JButton(); background.add(button, new …

Member Avatar
Member Avatar
+0 forum 3

Hi, I'd like to ask you a few questions about a things which don't work right now in my (very simple) graphic interface. The code I have: import java.awt.*; import javax.swing.*; public class Simulation{ public Simulation() { JFrame frame = new JFrame(); frame.setSize(1200,900); frame.setTitle("Traffic simulator"); frame.setResizable(false); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); JPanel background = new JPanel(new GridBagLayout()); background.setBackground(Color.lightGray); RoadSystem roads = new RoadSystem(); background.add(roads, new GridBagConstraints(0,0,1,3,3.0,1.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 10, 10, 10), 0, 0)); Stats stats = new Stats(); background.add(stats, new GridBagConstraints(1,0,1,1,1.0,1.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 10, 10, 10), 0, 0)); Settings settings = new Settings(); background.add(settings , new GridBagConstraints(1,1,1,1,1.0,1.0, GridBagConstraints.WEST, GridBagConstraints.NONE, …

Member Avatar
Member Avatar
+0 forum 1

Hi i am new to java and just learning as i go , I the basic of calling mothod arguments and so forth but i am having difficulties calling my array method so it would come up to the terminal to the user when the code is running . i have declared the array list paramter to ( int [] name ) , then called the array MyObject.MyMethod ( 01234 ) . I tried to return the array list then call the method that way but is not worrking please can some one show me the correct way to implement …

Member Avatar
Member Avatar
+0 forum 11

Dear all I am working on a project for my customer . I wrote code to search items from sql using vb.net Now my code working fine.....when I search data using itemid it show me data in all related textboxes but not in datagrid here my code Dim connection As New SqlConnection("Server= DESKTOP-QN6F623; Database = dbo_main; Integrated Security = true") Dim command As New SqlCommand("select * from items where itemnumber=@itemnumber", connection) command.Parameters.Add("@itemnumber", SqlDbType.Int).Value = ItemnumberTextBox.Text Dim adapter As New SqlDataAdapter(command) Dim table As New DataTable() adapter.Fill(table) ItemnameTextBox.Text = "" If table.Rows.Count() > 0 Then ' return only 1 row ItemnameTextBox.Text …

Member Avatar
Member Avatar
+0 forum 1

You must then use a loop (for or while) to find the sum of all the numbers in the geometric sequence of 3 less than N. The geometric sequence of 3 looks like this 1, 3, 9, 27, 81, 243, ... where you start with the number one and multiply the previous number by 3 to get the next number. add the sequences together to get answer

Member Avatar
Member Avatar
+0 forum 4

The End.